package com.jstorm.count.mapper.lineReconnaissance;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: common
 * @Package: com.jstorm.count.mapper.network
 * @ClassName: NetworkMapper
 * @Description: 线路侦察数据特征采集
 * @Author: Mr_hu
 * @CreateDate: 2018/12/28 18:34
 * ***********************************************************
 * @UpdateUser: Mr_hu
 * @UpdateDate: 2018/12/28 18:34
 * @UpdateRemark: The modified content
 * @Version: 1.0
 * ***********************************************************
 * Copyright: Copyright (c) 2018
 **/
@Mapper
public interface LineReconnaossanceMapper {

    /**
     * 查询数量
     * @return
     */
    @Select("select *  from (select table_name as metadataName  ,num_rows as  metadataCount  from all_tables WHERE table_name              LIKE  '%T_WB%' ORDer by  num_rows desc) \n" +
       "where metadataName='T_WB_ATMSVR' or metadataName='T_WB_RECONRSLT'or metadataName='T_WB_VCAT'")
    List<Map<String, Object>>  selectLineReconnaossanceCount();

    /**
     * 查询总数
     * @return
     */
    @Select("select sum(metadataCount) as Total_count,'线路侦察数据特征采集服务' as Total_name from (select  table_name as                                metadataName  ,num_rows as  metadataCount from all_tables \n" +
        "WHERE  table_name LIKE  '%T_WB%' ORDer by num_rows desc)\n" +
        "where metadataName='T_WB_ATMSVR' or metadataName='T_WB_RECONRSLT'or metadataName='T_WB_VCAT'")
    List<Map<String, Object>>   selectLineReconnaossanceTotal();

}
